package com.ctgu.edu.controller;

import com.ctgu.edu.pojo.Users;
import com.ctgu.edu.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.xml.ws.RequestWrapper;

@Controller
@RequestMapping("/users")
public class UsersController {

    @Autowired
    @Qualifier("UsersServiceImpl")
    private UsersService userServiceImpl;

    @RequestMapping("/register")
    public String Register(Users users){

        System.out.println("RUN TO HERE!");
        userServiceImpl.addUser(users);

        return "hello";
    }
}
